package com.example.springboot01.resp.enums;

public enum CommonRespEnum implements RespEnum {

    DELETE_OK(1002, "删除成功"),

    UPDATE_OK(1002, "更新成功"),

    UNAUTHORIZED(401, "未登录"),

    SESSIONEXPIRE(402, "无效的会话"),

    ;

    private String msg;

    private int code;

    CommonRespEnum(int code, String msg){
        this.code = code;
        this.msg = msg;
    }

    @Override
    public String getMsg() {
        return this.msg;
    }

    @Override
    public int getCode() {
        return this.code;
    }
}
